package com.roy.spring.ioc.beanfactory;

import com.roy.spring.ioc.config.SpringConfig;
import com.roy.spring.ioc.annotation.Component;
import com.roy.spring.ioc.annotation.Inject;
import com.roy.spring.ioc.util.ClassUtil;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 
 * @ClassName: AnnotationContext
 * @Description: 基于注解环境的bean工厂
 * 
 */
@SuppressWarnings("unchecked")
public abstract class AnnotationContext extends ApplicationContext implements BeanFactory {

	private static final Logger logger = LoggerFactory
			.getLogger(AnnotationContext.class);

	public AnnotationContext(SpringConfig config) {
		register(config.basePath());
	}

	/**
	 * 依赖注入
	 * @param basePath
	 */
	public abstract void register(String basePath) ;

}
